<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="../include_new.jsp"%>
</head>
<body id="z_body">
	<div class="panel">
		<div class="panel-heading">
			<i class="icon icon-list"></i> 
			${actName}警务通信息
		</div>
		<div class="panel-body">
		
			<form class="form-horizontal" id="form1">
				<input name="act" value="${act}" type="hidden"/>
				<input name="bh" value="${one.bh}" type="hidden"/>				
				<div class="form-group">
					<label class="col-md-3">卡编号</label>
					<div class="col-md-6">
						<input class="form-control" name="kbh" value="${one.kbh}" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3"><font color='red'>*</font>警务通号码</label>
					<div class="col-md-6">
						<input class="form-control" name="jwthm" validType="notEmpty,jwthm" value="${one.jwthm}" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3">设备编号</label>
					<div class="col-md-6">
						<input class="form-control" name="sbbh" value="${one.sbbh}" >
					</div>
				</div>
				<shiro:hasRole name="admin">
					<div class="form-group">
						<label class="col-md-3 "><font color='red'>*</font>所属单位</label>
						<div class="col-md-6">
							<input name="ssdwdm" value="${one.ssdwdm}" type="hidden">
							<c:if test="${actName == '新增'}">
									<input class="form-control app_selector" name="ssdwmc" value="${loginUser.ssdwmc}" validType="notEmpty" data_tree="{type:'organ'}">
							</c:if>
							<c:if test="${actName== '修改'}">
									<input class="form-control app_selector" name="ssdwmc" value="${one.ssdwmc}" validType="notEmpty" data_tree="{type:'organ'}">
							</c:if>
						</div>
					</div>
				</shiro:hasRole>
				<shiro:lacksRole name="admin">
					<div class="form-group">
						<label class="col-md-3 ">所属单位</label>
						<div class="col-md-6">
							<input class="form-control" name="" value="${loginUser.ssdwmc}" readonly="readonly">
						</div>
					</div>
				</shiro:lacksRole>
				<div class="form-group">
					<label class="col-md-3"></label>
					<div class="col-md-6">
						<a class="btn btn-primary" onclick="save()">保存</a> &nbsp;
						<a class="btn btn-default" onclick="parent.closeModal()">取消</a>
					</div>
				</div>
				<div style='height:200px;' >
				</div>
			</form>
			
		</div>
	</div>

	
<script type="text/javascript">
	/**
	 * 保存
	 */
	function save() {
		//提交
		if(validateForm("form1")) {//表单验证
			tool.save("save", $("#form1").serialize(), function(data) {//提交
				parent.getPage();
				setTimeout(function(){
					parent.closeModal();
				}, 800);
			});
		}
	}
	
</script>
</body>
</html>